package com.ruoyi.bus.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bus.mapper.WitNoticeMapper;
import com.ruoyi.bus.domain.WitNotice;
import com.ruoyi.bus.service.IWitNoticeService;

/**
 * 系统通知Service业务层处理
 * 
 * @author caiyanshan
 * @date 2021-04-14
 */
@Service
public class WitNoticeServiceImpl implements IWitNoticeService 
{
    @Autowired
    private WitNoticeMapper witNoticeMapper;

    /**
     * 查询系统通知
     * 
     * @param noticeId 系统通知ID
     * @return 系统通知
     */
    @Override
    public WitNotice selectWitNoticeById(Long noticeId)
    {
        return witNoticeMapper.selectWitNoticeById(noticeId);
    }

    /**
     * 查询系统通知列表
     * 
     * @param witNotice 系统通知
     * @return 系统通知
     */
    @Override
    public List<WitNotice> selectWitNoticeList(WitNotice witNotice)
    {
        return witNoticeMapper.selectWitNoticeList(witNotice);
    }

    /**
     * 新增系统通知
     * 
     * @param witNotice 系统通知
     * @return 结果
     */
    @Override
    public int insertWitNotice(WitNotice witNotice)
    {
        witNotice.setCreateTime(DateUtils.getNowDate());
        return witNoticeMapper.insertWitNotice(witNotice);
    }

    /**
     * 修改系统通知
     * 
     * @param witNotice 系统通知
     * @return 结果
     */
    @Override
    public int updateWitNotice(WitNotice witNotice)
    {
        return witNoticeMapper.updateWitNotice(witNotice);
    }

    /**
     * 批量删除系统通知
     * 
     * @param noticeIds 需要删除的系统通知ID
     * @return 结果
     */
    @Override
    public int deleteWitNoticeByIds(Long[] noticeIds)
    {
        return witNoticeMapper.deleteWitNoticeByIds(noticeIds);
    }

    /**
     * 删除系统通知信息
     * 
     * @param noticeId 系统通知ID
     * @return 结果
     */
    @Override
    public int deleteWitNoticeById(Long noticeId)
    {
        return witNoticeMapper.deleteWitNoticeById(noticeId);
    }
}
